package com.zh.springcloud.controller;

import com.zh.springcloud.common.Result;
import com.zh.springcloud.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @ClassName StorageController
 * @date: 2021.08.12 18:23
 * @Author: zhanghang
 */
@RestController
public class StorageController {

	@Autowired
	private StorageService storageService;

	@PostMapping("/storage/decrease")
	Result<?> decrease(@RequestParam("productId") Long productId, @RequestParam("count")Integer count){

		return storageService.decrease(productId,count);
	}
}
